<script id="demo" type="text/javascript">
$(document).ready(function() {
	// validate signup form on keyup and submit
	 $("#WebsiteAdminAddForm").validate({
             errorElement: 'span',
		rules: {
                        "data[Website][website_name]":{required: true},
                        "data[Website][domain]":{required: true}
		},
		messages: {
                     
			terms: " "
		},errorPlacement: function(error, element) {
                           $(element).parent().addClass("error");
                           error.appendTo( element.parent());
		},
		// set this class to error-labels to indicate valid fields
		success: function(label) {                     
			  $(label).parent().removeClass("error");
		}

	});



});
</script>
<div class="users form">
<?php echo $form->create('Website',array('action'=>'admin_add/'.$id));?>
    <div class="fields">
     <h2><?php __('Add Website');?></h2>
	<fieldset>
 		 <p>
            <label for="name01" class="large">Website Name </label>
	<?php echo $form->input('website_name',array('label'=>false,'div'=>false)); ?></p>
                 <p>
            <label for="name01" class="large">Domain </label>
	<?php echo $form->input('domain',array('label'=>false,'div'=>false)); ?></p>
                  <p>
        <?php echo $form->input('user_id',array('type'=>'hidden', 'label'=>false,'value'=>$id,'div'=>false)); ?></p>
       
	</fieldset>
    </div>
      <div class="fields">
            <h2></h2>
            <p class="tright">
                <?php echo $form->submit(__('Save',true),array("div"=>false,"class"=>"butDef"));?>                                
                <?php echo $this->Html->link(__('Cancel', true), array('action' => 'index'),array("class"=>"butSim"),false); ?>
                
            </p>
        </div>
<?php echo $form->end();?>
</div>
